#pragma once
#include <Windows.h>
#include <d3d9.h>
#include <d3dx9.h>

class CTimer
{
private:
	INT64 m_tickPerSecond;
	INT64 m_currentTime;
	INT64 m_lastTime;
	INT64 m_lastFPSUpdate;
	INT64 m_fpsUpdateInterval;
	UINT m_numFrames;
	float m_runningTime;
	float m_timeElapsed;
	float m_fps;
	bool m_timerStoped;
	CTimer(void);
	static CTimer* m_instance;
public:
	static CTimer* GetInstance();
	void Start();
	void Stop();
	void Update();
	bool IsStopped();
	float GetFPS();
	float GetRunningTime();
	float GetElapsedTime();

	~CTimer(void);
};

